package com.uls.ycl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uls.ycl.mapper.RepairRecordMapper;
import com.uls.ycl.domain.RepairRecord;
import com.uls.ycl.service.IRepairRecordService;

/**
 * 维修记录Service业务层处理
 * 
 * @author ycl
 * @date 2024-11-16
 */
@Service
public class RepairRecordServiceImpl implements IRepairRecordService 
{
    @Autowired
    private RepairRecordMapper repairRecordMapper;

    /**
     * 查询维修记录
     * 
     * @param recordId 维修记录主键
     * @return 维修记录
     */
    @Override
    public RepairRecord selectRepairRecordByRecordId(Long recordId)
    {
        return repairRecordMapper.selectRepairRecordByRecordId(recordId);
    }

    /**
     * 查询维修记录列表
     * 
     * @param repairRecord 维修记录
     * @return 维修记录
     */
    @Override
    public List<RepairRecord> selectRepairRecordList(RepairRecord repairRecord)
    {
        return repairRecordMapper.selectRepairRecordList(repairRecord);
    }

    /**
     * 新增维修记录
     * 
     * @param repairRecord 维修记录
     * @return 结果
     */
    @Override
    public int insertRepairRecord(RepairRecord repairRecord)
    {
        return repairRecordMapper.insertRepairRecord(repairRecord);
    }

    /**
     * 修改维修记录
     * 
     * @param repairRecord 维修记录
     * @return 结果
     */
    @Override
    public int updateRepairRecord(RepairRecord repairRecord)
    {
        return repairRecordMapper.updateRepairRecord(repairRecord);
    }

    /**
     * 批量删除维修记录
     * 
     * @param recordIds 需要删除的维修记录主键
     * @return 结果
     */
    @Override
    public int deleteRepairRecordByRecordIds(Long[] recordIds)
    {
        return repairRecordMapper.deleteRepairRecordByRecordIds(recordIds);
    }

    /**
     * 删除维修记录信息
     * 
     * @param recordId 维修记录主键
     * @return 结果
     */
    @Override
    public int deleteRepairRecordByRecordId(Long recordId)
    {
        return repairRecordMapper.deleteRepairRecordByRecordId(recordId);
    }
}
